package com.hantanger.weblog.model;

import com.googlecode.objectify.annotation.Cache;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Index;

/**
 * 用户表
 * @author lys
 *
 */
@Cache
@Entity
public class User {
	
	public static final int PRIVILEGE_AUTHOR = 0;//作者
	
	public static final int PRIVILEGE_ADMIN = 100;//管理员
	
	@Id private Long id;
	
	@Index
	private String email;
	
	private String password;
	
	private String nickname;

	//权限
	private int privilege;

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public int getPrivilege() {
		return privilege;
	}

	public void setPrivilege(int privilege) {
		this.privilege = privilege;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

}
